1. Field of the Invention
The present invention relates to a magnetic switch and a magnetic sensor.
2. Description of the Related Art
A non-contact type magnetic switch using a magnetoresistive element are known. In this conventional non-contact type magnetic switch, a permanent magnet is disposed in the vicinity of a magnetoresistive element that exhibits the magnetoresistance effect and a magnetic field of the permanent magnet acts on the magnetoresistive element. Further, a shield plate for shielding the magnetoresistive element from the magnetic field of the permanent magnet is movably disposed between the magnetoresistive element and the permanent magnet.
The magnetoresistive element basically has a lamination structure that is composed of a free layer (free magnetic layer), a non-magnetic layer, a fixed layer (pinned magnetic layer), and an exchange bias layer (antiferromagnetic layer).
A bias magnetic field of the exchange bias layer acts on the fixed layer, whereby the fixed layer is magnetized and the magnetization direction is fixed to a particular direction. On the other hand, the magnetization direction of the free layer is varied by an external magnetic field.
In the above conventional non-contact type magnetic switch using a magnetoresistive element, the permanent magnet is used as a magnet for applying an external magnetic field to the free layer. The magnetization direction of the free layer is varied to a desired direction, that is, rotated with respect to the magnetization direction of the fixed layer, by the permanent magnet.
The magnetic shield plate for interrupting the magnetic field of the permanent magnet to act on the magnetoresistive element is inserted between or retreated from between the magnetoresistive element and the permanent magnet, whereby the strength of the magnetic field acting on the magnetoresistive element is varied and the magnitude of its resistance is thereby varied. A switch operation is performed based on an output signal that reflects a resistance variation of the magnetoresistive element.
However, in the conventional non-contact type switch, since the resistance of the magnetoresistive element varies in accordance with the strength of a magnetic field, that is, insertion or retreat of the shield plate, the resistance of the magnetoresistive element varies gradually as the shield plate approaches (goes into) the space between the magnetoresistive element and the permanent magnet or goes away (retreats) from the space. That is, the output signal of the magnetoresistive element (i.e., the resistance) varies slowly at the time of switching.
Therefore, the conventional non-contact type magnetic switch using a magnetoresistive element is not suitable for switch operations for, for example, instantaneous on/off switching and instantaneous detection of a movement of a member to be detected.